Skip to content

Conversation

viktorsomogyi
Copy link
Contributor

@viktorsomogyi viktorsomogyi commented Oct 2, 2025

When using the zookeeper-security-migration tool without the '–enable.path.check' option, the script not only updates the ACLs for the existing znodes, but also creates any non-existing ones (with the ACL options specified) using null values based on the list defined in ZkData.SecureRootPaths. This is especially problematic for the /migration znode as the current logic only checks for the existence of the znode and later the migration process will hang when it tries to parse the null value over and over again.

In summary, the migration cannot be completed if the zookeeper-security-migration script was run previously, and the only workaround is to manually remove the /migration znode in such cases. I propose a simple fix to circumvent the manual step by recreating the /migration znode if it contains a null value.

@viktorsomogyi
Copy link
Contributor Author

This is a reupload of #20128 as that one has the JDK8 build stuck for some reason (while it works locally).
No review required.

@viktorsomogyi viktorsomogyi added ci-approved do-not-merge PRs that are only open temporarily and should not be merged and removed ci-approved labels Oct 2, 2025
Copy link

@kada2004 kada2004 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

look good

@viktorsomogyi viktorsomogyi added kraft and removed do-not-merge PRs that are only open temporarily and should not be merged labels Oct 7, 2025
@viktorsomogyi
Copy link
Contributor Author

Since it builds here I'll merge this and close #20128. I reran the flaky tests locally and they pass.

@viktorsomogyi viktorsomogyi merged commit d13c1f6 into apache:3.9 Oct 7, 2025
1 check failed

<p>The new standalone controller in the example configuration above should be formatted using the <code>kafka-storage format --standalone</code>command.</p>

<p>Note: The migration can stall if the <a href="#zk_authz_migration">ZooKeeper Security Migration Tool</a> was previously executed (fixed from 3.9.2, see <a href="https://issues.apache.org/jira/browse/KAFKA-19480">KAFKA-19026</a> for more details). As a workaround, the malformed "/migration" node can be removed from ZooKeeper by running <code>delete /migration</code> with the <code>zookeeper-shell.sh</code> CLI tool.</p>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: KAFKA-19026 -> KAFKA-19480

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

apache/kafka-site#708 has the same issue. I will file a minor to fix it

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@chia7712 thanks and sorry, that slipped through me..

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

don't worry 😄

we will file a PR to fix both repos

chia7712 pushed a commit that referenced this pull request Oct 10, 2025
see #20627 (comment)

This pull request corrects a typo in the documentation by updating the
JIRA link from KAFKA-19026 to KAFKA-19480 in the ops.html file.

Reviewers: Chia-Ping Tsai <[email protected]>
chia7712 pushed a commit to apache/kafka-site that referenced this pull request Oct 13, 2025
see apache/kafka#20627 (comment)

This pull request corrects a typo in the documentation by updating the JIRA link from KAFKA-19026 to KAFKA-19480 in the ops.html file.

Reviewers: Chia-Ping Tsai [email protected]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants